import { provide, ref } from "vue";

export function menuPermissionDialogEvent() {
  /**
   * 窗口可见状态
   */
  const menuPermissionDialogVisible = ref(false);
  provide("menuPermissionDialogVisible", menuPermissionDialogVisible);

  const changeSetMenuPermissionDialogVisible = () => {
    menuPermissionDialogVisible.value = !menuPermissionDialogVisible.value;
  };
  provide(
    "changeSetMenuPermissionDialogVisible",
    changeSetMenuPermissionDialogVisible
  );
  return {
    menuPermissionDialogVisible,
    changeSetMenuPermissionDialogVisible,
  };
}
